import service from '@/utils/requestFile'
import {generateRandomString, generateSignature} from '@/utils';

//阿里云文件上传
export function ossOssPrivateSign () {
  const timeStamp = new Date().getTime() + '';
  const nonce = generateRandomString(6);
  const miKey = "e5HLyMSU2XorgMtBMbwTBg4EBrP8lASl";
  return service({
    url: '/api/v1/crew-server/oss/ossPrivateSign',
    method: 'get',
    headers: {
      'front-request-id': 'property-1.0.0-' + generateRandomString(8) + '-' + new Date().getTime(),
      timeStamp,
      nonce: generateRandomString(6),
      Authorization: localStorage.getItem('authorization'),
      'ics-authorization': localStorage.getItem('icsAuthorization'),
      sign: generateSignature(timeStamp, nonce, miKey),
      token: localStorage.getItem('Admin-Token'),
    }
  })
}





